package com.example.config.reciver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class DirectReceiver {

    @SendTo("directQueue")
    @RabbitHandler
    @RabbitListener(queues = "directQueue")
    public String comsumeDirectQueue(Map message){
        System.out.println("DirectReceiver1消费者收到消息:" + message);
        return "SUCCESS1";
    }
}
